import numpy as np
b=np.array(([1,2,3],[4,5,6],[7,8,9]))
print(b)
a1=b[0]
print('a1=',a1)
a2=b[0][0]
print('a2=',a2)
a3=b[0,2]
print('a3=',a3)
a4=b[[0,1]]
print('a4=',a4)
a5=b[[0,1],[1,2]]
print('a5=',a5)

x=np.arange(0,100,10,dtype=np.floating)
print(x)
a6=x[[1,3,5]]
print('a6=',a6)
index=np.random.randint(0,len(x),5)
print('index=',index)
noise=np.random.standard_normal(5)*0.3
print('noise=',noise)
print('a7=',x[index])
x[index]+=noise
print('a8=',x[index])

